#!/bin/sh

echo "running temp file remove script"

if [ ! -z "$DOMINO_DATA_PATH" ]; then
  echo "removing tempfiles:" [$DOMINO_DATA_PATH/*.DTF]
  find $DOMINO_DATA_PATH -name "*.DTF" -exec rm -f '{}' \;

  echo "removing tempfiles:" [$DOMINO_DATA_PATH/*.TMP]
  find $DOMINO_DATA_PATH -name "*.TMP" -exec rm -f '{}' \;
fi

if [ ! -z "$DOMINO_VIEW_REBUILD_DIR" ]; then
  echo "removing tempfiles:" [$DOMINO_VIEW_REBUILD_DIR/*.DTF]
  find $DOMINO_DATA -name "*.TMP" -exec rm -f '{}' \;
fi

exit 0
